package com.allenkerr.app;

import com.alibaba.fastjson.JSON;
import com.allenkerr.client.customer.Customer;
import com.allenkerr.client.customer.CustomerService;
import com.allenkerr.client.customer.CustomerServiceImplService;

import java.util.List;

/**
 * Created by 小柯(Allen Kerr) on 17.5.16 16:40.
 */
public class CustomerApp {

    public static void main(String[] args) {
        CustomerServiceImplService service = new CustomerServiceImplService();
        CustomerService proxy = service.getCustomerServiceImplPort();
        List<Customer> customerList = proxy.findAll();
        for (Customer customer : customerList) {
            System.out.println(JSON.toJSONString(customer));
        }
        System.out.println("\n");
        Customer customer = proxy.findById(1);
        System.out.println(JSON.toJSONString(customer));
    }

}
